package com.ytkj.digitalConstruction.entity.message;

import java.util.Date;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.NotBlank;

/**
 * 消息
 * @author iking
 *
 */
public class Message {
    private Integer messageId;

    @NotNull(message = "消息发送类型不能为空！")
    private Integer type;

    @NotBlank(message = "消息内容不能为空！")
    @Size(max=2048,message="消息不能大于2048个字！")
    private String content;

    @NotNull(message = "消息的发送时间不能为空！")
    private Date publicDate;

    private Integer publisher;

    private Date createDate;

    private Integer status;

    @NotBlank(message = "消息的标题不能为空！")
    @Size(max=64,message="消息标题不能大于64个字！")
    private String title;

    private String dingTaskId;
    @Size(max=45,message="消息种类不能大于45个字！")
    private String msgType;

    public Integer getMessageId() {
        return messageId;
    }

    public void setMessageId(Integer messageId) {
        this.messageId = messageId;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content == null ? null : content.trim();
    }

    public Date getPublicDate() {
        return publicDate;
    }

    public void setPublicDate(Date publicDate) {
        this.publicDate = publicDate;
    }

    public Integer getPublisher() {
        return publisher;
    }

    public void setPublisher(Integer publisher) {
        this.publisher = publisher;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title == null ? null : title.trim();
    }

    public String getDingTaskId() {
        return dingTaskId;
    }

    public void setDingTaskId(String dingTaskId) {
        this.dingTaskId = dingTaskId == null ? null : dingTaskId.trim();
    }

    public String getMsgType() {
        return msgType;
    }

    public void setMsgType(String msgType) {
        this.msgType = msgType == null ? null : msgType.trim();
    }
}